package dj.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dj.dao.BackendUserMapper;
import dj.entity.BackendUser;
import dj.service.BackendUserService;


@Service
public class BackendUserServiceImpl implements BackendUserService{
	@Autowired
	private BackendUserMapper mapper;
	
	@Override
	public BackendUser dologin(String userCode,String userPassword) {
		BackendUser user = null;
		user=mapper.dologin(userCode);
		if(user!=null){
			if(!user.getUserPassword().equals(userPassword)){
				user=null;
			}
		}
		return user;
	}
	
}
